package account.command;

import java.sql.SQLException;
import java.util.ArrayList;

import account.dao.AccountDAO;
import account.dao.factory.DAOAbstractFactory;
import account.dao.factory.DAOAbstractFactory.DataBase;
import account.dao.mysql.ModelHelper;
import account.model.AccountModel;

public class GetAccountsCommand implements Command {

	public ArrayList< AccountModel > outAccountModels;
	
	@Override
	public void execute() throws CommandException {
		AccountDAO accountDAO = DAOAbstractFactory.getFactory().getAccountDAO();
		try {
			outAccountModels = accountDAO.getAccounts();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw new CommandException("", e);
		}
		
	}

}
